import 'package:flutter/material.dart';

class Demo2 extends StatefulWidget {
  @override
  State<StatefulWidget> createState() {
    return new Demo2State();
  }
}

class Demo2State extends State<Demo2> {
  @override
  Widget build(BuildContext context) {
    return new Scaffold(
      appBar: new AppBar(
        title: new Text('流式布局（Wrao跟Flow）'),
      ),
      body: new Column(
        mainAxisAlignment: MainAxisAlignment.spaceAround,
        children: <Widget>[
          new Expanded(
            child: new Wrap(
              spacing: 30.0,
              runSpacing: 10.0,
              alignment: WrapAlignment.center,
              children: <Widget>[
                new Chip(
                  avatar: new CircleAvatar(backgroundColor: Colors.blue, child: new Text('A')),
                  label: new Text('wqeqeqw1'),
                ),
                new Chip(
                  avatar: new CircleAvatar(backgroundColor: Colors.blue, child: new Text('B')),
                  label: new Text('wqeqeqw2'),
                ),
                new Chip(
                  avatar: new CircleAvatar(backgroundColor: Colors.blue, child: new Text('C')),
                  label: new Text('wqeqeqw3'),
                ),
                new Chip(
                  avatar: new CircleAvatar(backgroundColor: Colors.blue, child: new Text('D')),
                  label: new Text('wqeqeqw4'),
                ),
              ],
            ),
          ),
        ],
      ),
    );
  }
}